package z_app_lotto;

import java.io.*;
import java.util.*;
class LoadData
{
	String count; // 로또 회차
	Vector data = new Vector();
	String fileName="src/z_app_lotto/lotto.dat";

	public LoadData(){
            data = read();
	}
	public Vector read()
	{
		FileReader reader = null;
		BufferedReader readBuffer = null;

		try
		{
			reader = new FileReader(fileName);
			readBuffer = new BufferedReader(reader);

		}catch(Exception ex){System.out.println("file open error -->" + ex);}

		String str=null;
		StringTokenizer token=null;

		try
		{
			while(true) //파일로 부터 데이터 읽기
			{
				str = readBuffer.readLine();
				if(str == null) break;
				data.add(str);
			}
			readBuffer.close();
		}catch(Exception ex){System.out.println("file reading error -->" + ex);}
		return data;
	}

        public Vector getData(){
            return data;
        }

}
